import {
  articleDetails
} from "../../apis/card";
const app = getApp();

Page({
  data: {
    article: ''
  },

  onLoad(options) {
    this.setData({
      ...options
    });
    this.getArticleDetails(options.id);
  },

  getArticleDetails(id) {
    articleDetails(id).then(res => {
      if (res.data.code === 200) {
        wx.setNavigationBarTitle({
          title: res.data.data.title
        });
        this.setData({
          article: res.data.data.content
        });
      };
    });
  }
})